<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>woman</title>
	</head>
	<body>
		<script type="text/javascript">
			function Person(){
				this.nation = "汉";
				this.skinColor = "黄色";
			}
			Person.prototype.getNation = function(){
				return this.nation;
			}
			Person.prototype.getSkinColor = function(){
				return this.skinColor;
			}
			//创建一个新函数并继承上一个
			function Woman(){
				this.sex = "女";
			}
			Woman.prototype = new Person();
			Woman.prototype.getSex = function(){
				return this.sex;
			}
			var aa = new Woman();
			alert("民族：" + aa.getNation() +"\n" + "肤色：" + aa.getSkinColor() + "\n" + "性别：" + aa.getSex() )
			
			
		</script>
		
	</body>
</html>
